package com.sky.service;

import com.sky.dto.*;
import com.sky.result.PageResult;
import com.sky.vo.OrderPaymentVO;
import com.sky.vo.OrderStatisticsVO;
import com.sky.vo.OrderSubmitVO;
import com.sky.vo.OrderVO;

/**
 * @author 梦龙
 * @date 2023/12/7 19:49
 */
public interface OrderService {

    /**
     * @description:用户下单
     * @return: com.sky.vo.OrderSubmitVO
     * @author: 梦龙
     * @time: 2023/12/7 19:53
     */
    OrderSubmitVO submit(OrdersSubmitDTO ordersSubmitDTO);

    /**
     * 订单支付
     *
     * @param ordersPaymentDTO
     * @return
     */
    OrderPaymentVO payment(OrdersPaymentDTO ordersPaymentDTO) throws Exception;

    /**
     * 支付成功，修改订单状态
     *
     * @param outTradeNo
     */
    void paySuccess(String outTradeNo);

    OrderVO orderDetails(Long ordersId);

    /**
     * @description:用户端分页查询订单
     * @return: com.sky.vo.OrderListHistoryVO
     * @author: 梦龙
     * @time: 2023/12/10 18:53
     */
    PageResult pageQuery4User(int page, int pageSize, Integer status);

    /**
     * @description:取消订单
     * @return: void
     * @author: 梦龙
     * @time: 2023/12/10 21:07
     */
    void cancelOrder(Long id);

    /**
     * @description:再来一单
     * @return: void
     * @author: 梦龙
     * @time: 2023/12/10 21:14
     */
    void repetition(Long id);

    /**
     * @description:管理端订单搜索
     * @return: com.sky.result.PageResult
     * @author: 梦龙
     * @time: 2023/12/11 0:51
     */
    PageResult pageQuery(OrdersPageQueryDTO ordersPageQueryDTO);

    /**
     * @description:各个状态的订单数量统计，包括待派送，派送中，待接单
     * @return: com.sky.vo.OrderStatisticsVO
     * @author: 梦龙
     * @time: 2023/12/11 11:10
     */
    OrderStatisticsVO statistic();

    /**
     * @description:接单
     * @return: void
     * @author: 梦龙
     * @time: 2023/12/11 16:28
     */
    void orderConfirm(OrdersConfirmDTO ordersConfirmDTO);

    /**
     * @description:拒单
     * @return: void
     * @author: 梦龙
     * @time: 2023/12/11 16:46
     */
    void orderRejection(OrdersRejectionDTO ordersRejectionDTO);

    /**
     * @description:通过订单id将订单状态设置为取消
     * @return: void
     * @author: 梦龙
     * @time: 2023/12/11 21:49
     */
    void orderCancel(OrdersCancelDTO ordersCancelDTO);

    /**
     * @description:通过订单id将订单状态设置为派送中 4
     * @return: void
     * @author: 梦龙
     * @time: 2023/12/11 22:09
     */
    void orderDelivery(Long id);

    /**
     * @description:完成订单
     * @return: void
     * @author: 梦龙
     * @time: 2023/12/11 22:21
     */
    void orderComplete(Long id);

    /**
     * @description:客户催单
     * @return: void
     * @author: 梦龙
     * @time: 2023/12/12 21:33
     */
    void orderReminder(Long id);
}
